package com.quasar.hpatient.bean.mine_file;

import android.text.TextUtils;

import lib.quasar.context.BaseConstant;
import lib.quasar.recycler.model.SectionModel;
import lib.quasar.widget.photo.PhotoModel;

public final class FileBagBean implements PhotoModel, SectionModel {

    private String inspection_date = "";
    private String picture = "";

    /****************************************************************************/

    @Override
    public boolean isSection() {
        return TextUtils.isEmpty(picture);
    }

    @Override
    public String getSection() {
        if (TextUtils.isEmpty(inspection_date) || inspection_date.length() < 10) {
            return "未知时间";
        } else {
            return inspection_date.substring(0, 10);
        }
    }

    @Override
    public String getUrl() {
        return BaseConstant.API_URL + picture;
    }

    @Override
    public String getUrlLittle() {
        return BaseConstant.API_URL + picture;
    }

    /****************************************************************************/

    public String getInspection_date() {
        return inspection_date;
    }

    public void setInspection_date(String inspection_date) {
        this.inspection_date = inspection_date;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }
}
